﻿<%@ Page Language="C#" MasterPageFile="~/Share.Master" AutoEventWireup="true" CodeBehind="index.aspx.cs"
    Inherits="Web.index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <form id="form1" runat="server">
    <div class="pics">
        <div class="share">
            <div id="slidepre">
            <div class="slidepre" style="display:none;">
            </div></div>
            <div id="slidenext">
            <div class="slidenext" style="display:none;">
            </div>
            </div>
            <div class="slide" id="slide">
                <asp:Repeater ID="IndexPicRpt" runat="server">
                    <ItemTemplate>
                        <div class="feature">
                                <a href="<%#Eval("PicLink") %>" target="_blank">
                                <img src="<%#Eval("PicURL") %>" alt="<%#Eval("PicTitle") %>" title="<%#Eval("PicTitle") %>" />
                                </a>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
            </div>
        </div>
    </div>
    <div class="links">
        <asp:DataList ID="LinksList" runat="server" RepeatColumns="4">
            <ItemTemplate>
                <div class="linksrow">
                   <a href='<%# Eval("LinkURL") %>'>
                        <img src='<%# Eval("LinkPicURL") %>' /></a>
                </div>  
            </ItemTemplate>
        </asp:DataList>
    </div>
    <div class="clearboth">
    </div>
    <div class="news index">
                <div class="nav"><li>
                    <span><a href="news.aspx">新闻</a></span>
                    </li>
                </div>
                <div class="newslist">
                    <asp:DataList ID="NewsList" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
                        <ItemTemplate>
                            <div class="newsrow">
                                <div class="newsimg">
                                    <%# Eval("NewsHot") %><img src='<%# Eval("NewsPicURL")%>' alt="no img" width="90px"
                                        height="60px" /></div>
                                <div class="newstitle">
                                    <a href="newsreading.aspx?cid=<%# Eval("CategoryID")%>&id=<%# Eval("NewsID")%>">
                                        <%# Eval("Title")%></a></div>
                                <div class="newsdes">
                                    <%# Eval("NewsContent")%></div>
                        </ItemTemplate>
                    </asp:DataList>
                </div>
            </div>
    <div class="clearboth">
    </div>
    </form>
</asp:Content>
<asp:Content ID="content2" ContentPlaceHolderID="jsContent" runat="server">
<script language="javascript" type="text/javascript">
    $(function() {
        if ($(".feature").length > 1) {
            $("#slidepre").mouseover(function() {
                $(".slidepre").css("display", ""); //.css("cursor", "pointer");
                $("#slidepre").css("cursor", "pointer");
            }).mouseout(function() {
                $(".slidepre").css("display", "none"); //.css("cursor", "pointer");
                $("#slidepre").css("cursor", "default");
            });
            $("#slidenext").mouseover(function() {
                $(".slidenext").css("display", ""); //.css("cursor", "pointer");
                $("#slidenext").css("cursor", "pointer");
            }).mouseout(function() {
                $(".slidenext").css("display", "none"); //.css("cursor", "pointer");
                $("#slidenext").css("cursor", "default");
            });
        }
    });

    $(function() {
        $('#slide').after('<div class="slidehelp"><ul id="slidepager">').cycle({
            timeout: 5000, // milliseconds between slide transitions (0 to disable auto advance)
            fx: 'scrollHorz', // choose a transition type, ex: fade, scrollUp, shuffle, etc...            
            pager: '#slidepager', // selector for element to use as pager container
            pause: 0, // true to enable "pause on hover"
            pauseOnPagerHover: 0, // true to pause when hovering over pager link
            prev: '#slidepre',
            next: '#slidenext',
            speed: 500
        });
    });

    $(function() {
        $(".linksrow a").each(function() {
            if ($(this).attr("href") == "" || $(this).attr("href") == "#") {
                $(this).css("cursor", "default");
            }
        });
        $(".feature a").each(function() {
            if ($(this).attr("href") == "" || $(this).attr("href") == "#") {
                $(this).css("cursor", "default");
            }
        });
    })
</script>
</asp:Content>